package net.knightsandweekends.client;

import java.util.Date;

public class Calendar {

	final Date date = new Date();
	
	public int getNumDaysInMonth()
	{
		int month = date.getMonth();
		int year = date.getYear();
		
	    switch (month) {
	      case 1:
	        if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
	          return 29; // leap year
	        else
	          return 28;
	      case 3:
	        return 30;
	      case 5:
	        return 30;
	      case 8:
	        return 30;
	      case 10:
	        return 30;
	      default:
	        return 31;
	    }
	}
	
	public String getDay()
	{
		String day = Integer.toString(date.getDay());
		return day;
	}
	
}
